<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <!-- ===================== 单向绑定 ====================== -->
    <h1>单向绑定</h1>
    <div id="app_1">
        <span>{{name}}</span>
        <div>全写：<input type="text" v-bind:value = "name"></div>
        <div>简写：<input type="text" :value = "name"></div>
    </div>

    <script>
        new Vue({
            el: '#app_1',
            data: {
                name:"jia you er nv"
            }
        })
    </script>

    <!-- ===================== 双向绑定 ====================== -->
    <h1>双向绑定</h1>
    <div id="app_2">
        <span>{{name}}</span>
        <div>全写：<input type="text" v-model:value = "name"></div>
        <div>简写：<input type="text" v-model = "name"></div>
    </div>

    <script>
        new Vue({
            el: '#app_2',
            data: {
                name:"jia you er nv"
            }
        })
    </script>
</body>

</html>